<!DOCTYPE html>  
<html lang="zh">  
<head>  
    <meta charset="UTF-8">  
    <meta name="viewport" content="width=device-width, initial-scale=1.0">  
    <title>动态盒子大小示例</title>  
    <style>  
        canvas {  
            background-color: white;  
            border: 1px solid black;  
            display: block;  
            margin: auto;  
        }  
    </style>  
</head>  
<body>  
    <canvas id="canvas" width="800" height="600"></canvas>  
    <script src="./script2.js"></script>  
</body>  
</html>